package org.jeecg.modules.user.fallback;

import com.baomidou.mybatisplus.core.metadata.IPage;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.role.entity.SysUserRole;
import org.jeecg.modules.role.entity.SysUserRoleVO;
import org.jeecg.modules.user.api.SysUserApi;
import org.jeecg.modules.user.entity.SysUser;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@ConditionalOnMissingClass("org.jeecg.modules.system.controller.SysUserController")
public class SysUserFallback implements SysUserApi {
    @Override
    public Result<Boolean> deleteUserRole(String roleId, String userId) {
        throw new RuntimeException("未找到用户服务");
    }

    @Override
    public Result<SysUserRole> deleteUserRoleBatch(String roleId, String userIds) {
        throw new RuntimeException("未找到用户服务");
    }

    @Override
    public Result<IPage<SysUser>> getByOrg(String username, String realname, String orgId, List<String> deptIds, Integer pageNo, Integer pageSize) {
        throw new RuntimeException("未找到用户服务");
    }

    @Override
    public Result<Boolean> save(SysUser user) {
        throw new RuntimeException("未找到用户服务");
    }

    @Override
    public Result<SysUser> queryById(String id) {
        throw new RuntimeException("未找到用户服务");
    }

    @Override
    public Result<String> addSysUserRole(SysUserRoleVO sysUserRoleVO) {
        throw new RuntimeException("未找到用户服务");
    }
}
